﻿using Abp.Domain.Entities;
using Basefr.Attributes;
using Basefr.Core.Entities;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Paas.Core.Sys.Entities
{
    /// <summary>
    /// 角色
    /// </summary>
    [MainTable(nameof(Role))]
    public class Role : EntityBase, IPassivable, IPreDefined
    {
        public static string DefaultRoleName = "系统管理员";

        [Required]
        [MaxLength(100)]
        public string Name { get; set; }

        public bool IsActive { get; set; }
        public bool IsPreDefined { get; set; }

        public virtual List<RoleUser> Users { get; set; }

        public virtual List<RolePermission> Permissions { get; set; }

    }
}

